#ifndef REACTIVE_FALLBACK_SCHEDULER_H
#define REACTIVE_FALLBACK_SCHEDULER_H

#include "abstract_scheduler.h"
namespace scheduler
{
/**
 * @brief:  响应式备选，执行方式和被选相同，每次执行备选任务时都会执行一边响应式任务
 * @author: sherlock_lht
 */
class ReactiveFallbackScheduler: public AbstractScheduler
{
public:
    explicit ReactiveFallbackScheduler(const std::string &name);
    ~ReactiveFallbackScheduler() override;

    /**
     * @brief:  设置响应式任务，该任务是短请求任务
     * @author: sherlock_lht
     */
    bool setReactiveTask(const task::AbstractTaskConstPtr &task);
    bool setReactiveScheduler(const scheduler::AbstractSchedulerConstPtr &scheduler);

    /**
     * @brief:  添加任务，该任务是需要执行的任务，不能是短请求任务
     * @author: sherlock_lht
     */

    bool appendExecuteTask(const task::AbstractTaskConstPtr &task);
    bool appendExecuteScheduler(const scheduler::AbstractSchedulerConstPtr &scheduler);

    [[deprecated("reactive fallback scheduler cannot append task")]] bool appendTask(const task::AbstractTaskConstPtr &task) override;

    [[deprecated("reactive fallback scheduler cannot append scheduler")]] bool appendScheduler(const scheduler::AbstractSchedulerConstPtr &scheduler) override;

    [[deprecated("reactive fallback scheduler cannot set task")]] bool setTask(const task::AbstractTaskConstPtr &task) override;

    [[deprecated("reactive fallback scheduler cannot set task")]] bool setScheduler(const AbstractSchedulerConstPtr &scheduler) override;
};

}

#endif //REACTIVE_FALLBACK_SCHEDULER_H
